package com.dldata.devtools30.repository.api;



import com.dldata.devtools30.entity.DevtApiMainEntity;
import com.dldata.devtools30.repository.BaseRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by ai on 2017/1/11.
 */
@Repository
public interface DevtApiMainEntityDao extends BaseRepository<DevtApiMainEntity,String>, JpaSpecificationExecutor<DevtApiMainEntity> {

     @Query("select d from DevtApiMainEntity d where d.flid=?1")
     public List<DevtApiMainEntity> getAllDataById(String flid);
     
     @Query(value = "select k from DevtApiMainEntity k where (k.mc like ?1 ) and k.flid=?2 ")
     public List<DevtApiMainEntity> findByCondition(String input, String flid);
        
    @Query(value = "select k from DevtApiMainEntity k where k.dm like ?1 or k.bz like ?1 or k.pym like ?1 or k.mc like ?1")
    public List<DevtApiMainEntity> findByCondition(String input);

}
